# 使用while循环完成猜数字游戏
import random
num = random.randint(1,100)
count = 1

guess_num = int(input(f"请输入第{count}次猜测的数字:"))
while guess_num != num:
    if guess_num < num:
        print("猜小了!!!")
        count += 1
        guess_num = int(input(f"请输入第{count}次猜测的数字:"))
    else:
        print("猜大了!!!")
        count += 1
        guess_num = int(input(f"请输入第{count}次猜测的数字:"))
print(f"恭喜你，第{count}次猜对了!!!")